package com.ezops.poc.bo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.ezops.poc.validations.TradeIndentifier;
import com.ezops.poc.validations.result.ValidationResult;

public class EzopsOTEquityStaticModel implements Serializable {

	protected Integer tradeId = 0;
	protected String productCurrency;
	protected String productDescription;
	protected String productTickerSymbol;
	protected String productAssetName;
	protected String productPricingType;
	protected String productAccountingType;
	protected String productIsin;
	protected String productCusip;
	protected String productSedol;
	protected String bookId;
	protected String partyId;
	protected Date tradeTime;
	protected Date settlementDate;
	protected String errorMessage;
	public String fileName;
	protected int clientId;
	protected int assetId;

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	protected List<ValidationResult> exceptions;

	public TradeIndentifier getIdentifier() {
		TradeIndentifier identifier = new TradeIndentifier();
		identifier.setAction(this.getAction());
		if (this.getTradeId() != null)
			identifier.setTradeId(this.getTradeId());
		identifier.setFileName(this.getFileName());
		identifier.setStatus("valid");
		identifier.setClientId(this.getClientId());
		identifier.setAssetId(this.getAssetId());
		return identifier;
	}

	public void addException(String fieldName, String errorMessage) {
		if (this.exceptions == null)
			this.exceptions = new ArrayList<>();
		ValidationResult result = ValidationResult.getErrorResponse(fieldName,
				errorMessage);
		exceptions.add(result);
	}
	
	public List<ValidationResult> getErrors(){
		return exceptions;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public Integer getTradeId() {
		return tradeId;
	}

	public void setTradeId(Integer tradeId) {
		this.tradeId = tradeId;
	}

	public String getProductCurrency() {
		return productCurrency;
	}

	public void setProductCurrency(String productCurrency) {
		this.productCurrency = productCurrency;
	}

	public String getProductDescription() {
		return productDescription;
	}

	public void setProductDescription(String productDescription) {
		this.productDescription = productDescription;
	}

	public String getProductTickerSymbol() {
		return productTickerSymbol;
	}

	public void setProductTickerSymbol(String productTickerSymbol) {
		this.productTickerSymbol = productTickerSymbol;
	}

	public String getProductAssetName() {
		return productAssetName;
	}

	public void setProductAssetName(String productAssetName) {
		this.productAssetName = productAssetName;
	}

	public String getProductPricingType() {
		return productPricingType;
	}

	public void setProductPricingType(String productPricingType) {
		this.productPricingType = productPricingType;
	}

	public String getProductAccountingType() {
		return productAccountingType;
	}

	public void setProductAccountingType(String productAccountingType) {
		this.productAccountingType = productAccountingType;
	}

	public String getProductIsin() {
		return productIsin;
	}

	public void setProductIsin(String productIsin) {
		this.productIsin = productIsin;
	}

	public String getProductCusip() {
		return productCusip;
	}

	public void setProductCusip(String productCusip) {
		this.productCusip = productCusip;
	}

	public String getProductSedol() {
		return productSedol;
	}

	public void setProductSedol(String productSedol) {
		this.productSedol = productSedol;
	}

	public String getBookId() {
		return bookId;
	}

	public void setBookId(String bookId) {
		this.bookId = bookId;
	}

	public String getPartyId() {
		return partyId;
	}

	public void setPartyId(String partyId) {
		this.partyId = partyId;
	}

	public Date getTradeTime() {
		return tradeTime;
	}

	public void setTradeTime(Date tradeTime) {
		this.tradeTime = tradeTime;
	}

	public Date getSettlementDate() {
		return settlementDate;
	}

	public void setSettlementDate(Date settlementDate) {
		this.settlementDate = settlementDate;
	}

	public Date getTradingDay() {
		return tradingDay;
	}

	public void setTradingDay(Date tradingDay) {
		this.tradingDay = tradingDay;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getPriceType() {
		return priceType;
	}

	public void setPriceType(String priceType) {
		this.priceType = priceType;
	}

	public String getSettleCurrency() {
		return settleCurrency;
	}

	public void setSettleCurrency(String settleCurrency) {
		this.settleCurrency = settleCurrency;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getBuySell() {
		return buySell;
	}

	public void setBuySell(String buySell) {
		this.buySell = buySell;
	}

	public Date tradingDay;
	protected int quantity;
	protected double price;
	protected String priceType;
	protected String settleCurrency;
	protected String status;
	protected String action;
	protected String buySell;

	public int getClientId() {
		return clientId;
	}

	public void setClientId(int clientId) {
		this.clientId = clientId;
	}

	public int getAssetId() {
		return assetId;
	}

	public void setAssetId(int assetId) {
		this.assetId = assetId;
	}

}
